<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<style>
    .gradient-background {
        background: linear-gradient(to right, #ff0000, #0000ff);
        /* Другие браузеры */
        background: -webkit-linear-gradient(left, #ff0000, #0000ff);
        background: -moz-linear-gradient(left, #ff0000, #0000ff);
        background: -o-linear-gradient(left, #ff0000, #0000ff);
    }
</style>

<div class="gradient-background">
    <h1>Пример градиентного фона</h1>
    <p>Это текст на градиентном фоне.</p>
</div>
</body>
</html>